
sequence-queue:     file format elf64-littleaarch64


Disassembly of section .init:

00000000004004f8 <_init>:
  4004f8:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  4004fc:	910003fd 	mov	x29, sp
  400500:	94000042 	bl	400608 <call_weak_fn>
  400504:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400508:	d65f03c0 	ret

Disassembly of section .plt:

0000000000400510 <.plt>:
  400510:	a9bf7bf0 	stp	x16, x30, [sp, #-16]!
  400514:	b0000090 	adrp	x16, 411000 <__FRAME_END__+0x101cc>
  400518:	f947fe11 	ldr	x17, [x16, #4088]
  40051c:	913fe210 	add	x16, x16, #0xff8
  400520:	d61f0220 	br	x17
  400524:	d503201f 	nop
  400528:	d503201f 	nop
  40052c:	d503201f 	nop

0000000000400530 <exit@plt>:
  400530:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400534:	f9400211 	ldr	x17, [x16]
  400538:	91000210 	add	x16, x16, #0x0
  40053c:	d61f0220 	br	x17

0000000000400540 <malloc@plt>:
  400540:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400544:	f9400611 	ldr	x17, [x16, #8]
  400548:	91002210 	add	x16, x16, #0x8
  40054c:	d61f0220 	br	x17

0000000000400550 <__libc_start_main@plt>:
  400550:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400554:	f9400a11 	ldr	x17, [x16, #16]
  400558:	91004210 	add	x16, x16, #0x10
  40055c:	d61f0220 	br	x17

0000000000400560 <realloc@plt>:
  400560:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400564:	f9400e11 	ldr	x17, [x16, #24]
  400568:	91006210 	add	x16, x16, #0x18
  40056c:	d61f0220 	br	x17

0000000000400570 <__gmon_start__@plt>:
  400570:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400574:	f9401211 	ldr	x17, [x16, #32]
  400578:	91008210 	add	x16, x16, #0x20
  40057c:	d61f0220 	br	x17

0000000000400580 <abort@plt>:
  400580:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400584:	f9401611 	ldr	x17, [x16, #40]
  400588:	9100a210 	add	x16, x16, #0x28
  40058c:	d61f0220 	br	x17

0000000000400590 <puts@plt>:
  400590:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  400594:	f9401a11 	ldr	x17, [x16, #48]
  400598:	9100c210 	add	x16, x16, #0x30
  40059c:	d61f0220 	br	x17

00000000004005a0 <free@plt>:
  4005a0:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  4005a4:	f9401e11 	ldr	x17, [x16, #56]
  4005a8:	9100e210 	add	x16, x16, #0x38
  4005ac:	d61f0220 	br	x17

00000000004005b0 <printf@plt>:
  4005b0:	d0000090 	adrp	x16, 412000 <exit@GLIBC_2.17>
  4005b4:	f9402211 	ldr	x17, [x16, #64]
  4005b8:	91010210 	add	x16, x16, #0x40
  4005bc:	d61f0220 	br	x17

Disassembly of section .text:

00000000004005c0 <_start>:
  4005c0:	d280001d 	mov	x29, #0x0                   	// #0
  4005c4:	d280001e 	mov	x30, #0x0                   	// #0
  4005c8:	aa0003e5 	mov	x5, x0
  4005cc:	f94003e1 	ldr	x1, [sp]
  4005d0:	910023e2 	add	x2, sp, #0x8
  4005d4:	910003e6 	mov	x6, sp
  4005d8:	580000c0 	ldr	x0, 4005f0 <_start+0x30>
  4005dc:	580000e3 	ldr	x3, 4005f8 <_start+0x38>
  4005e0:	58000104 	ldr	x4, 400600 <_start+0x40>
  4005e4:	97ffffdb 	bl	400550 <__libc_start_main@plt>
  4005e8:	97ffffe6 	bl	400580 <abort@plt>
  4005ec:	00000000 	.inst	0x00000000 ; undefined
  4005f0:	00400b74 	.word	0x00400b74
  4005f4:	00000000 	.word	0x00000000
  4005f8:	00400d20 	.word	0x00400d20
  4005fc:	00000000 	.word	0x00000000
  400600:	00400d98 	.word	0x00400d98
  400604:	00000000 	.word	0x00000000

0000000000400608 <call_weak_fn>:
  400608:	b0000080 	adrp	x0, 411000 <__FRAME_END__+0x101cc>
  40060c:	f947f000 	ldr	x0, [x0, #4064]
  400610:	b4000040 	cbz	x0, 400618 <call_weak_fn+0x10>
  400614:	17ffffd7 	b	400570 <__gmon_start__@plt>
  400618:	d65f03c0 	ret
  40061c:	00000000 	.inst	0x00000000 ; undefined

0000000000400620 <deregister_tm_clones>:
  400620:	d0000081 	adrp	x1, 412000 <exit@GLIBC_2.17>
  400624:	d0000080 	adrp	x0, 412000 <exit@GLIBC_2.17>
  400628:	91016021 	add	x1, x1, #0x58
  40062c:	91016000 	add	x0, x0, #0x58
  400630:	91001c21 	add	x1, x1, #0x7
  400634:	cb000021 	sub	x1, x1, x0
  400638:	f100383f 	cmp	x1, #0xe
  40063c:	540000a9 	b.ls	400650 <deregister_tm_clones+0x30>  // b.plast
  400640:	580000c1 	ldr	x1, 400658 <deregister_tm_clones+0x38>
  400644:	b4000061 	cbz	x1, 400650 <deregister_tm_clones+0x30>
  400648:	d61f0020 	br	x1
  40064c:	d503201f 	nop
  400650:	d65f03c0 	ret
  400654:	d503201f 	nop
	...

0000000000400660 <register_tm_clones>:
  400660:	d0000081 	adrp	x1, 412000 <exit@GLIBC_2.17>
  400664:	d0000080 	adrp	x0, 412000 <exit@GLIBC_2.17>
  400668:	91016021 	add	x1, x1, #0x58
  40066c:	91016000 	add	x0, x0, #0x58
  400670:	cb000021 	sub	x1, x1, x0
  400674:	9343fc21 	asr	x1, x1, #3
  400678:	8b41fc21 	add	x1, x1, x1, lsr #63
  40067c:	9341fc21 	asr	x1, x1, #1
  400680:	b4000081 	cbz	x1, 400690 <register_tm_clones+0x30>
  400684:	580000a2 	ldr	x2, 400698 <register_tm_clones+0x38>
  400688:	b4000042 	cbz	x2, 400690 <register_tm_clones+0x30>
  40068c:	d61f0040 	br	x2
  400690:	d65f03c0 	ret
  400694:	d503201f 	nop
	...

00000000004006a0 <__do_global_dtors_aux>:
  4006a0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4006a4:	910003fd 	mov	x29, sp
  4006a8:	f9000bf3 	str	x19, [sp, #16]
  4006ac:	d0000093 	adrp	x19, 412000 <exit@GLIBC_2.17>
  4006b0:	39416260 	ldrb	w0, [x19, #88]
  4006b4:	35000080 	cbnz	w0, 4006c4 <__do_global_dtors_aux+0x24>
  4006b8:	97ffffda 	bl	400620 <deregister_tm_clones>
  4006bc:	52800020 	mov	w0, #0x1                   	// #1
  4006c0:	39016260 	strb	w0, [x19, #88]
  4006c4:	f9400bf3 	ldr	x19, [sp, #16]
  4006c8:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4006cc:	d65f03c0 	ret

00000000004006d0 <frame_dummy>:
  4006d0:	b0000080 	adrp	x0, 411000 <__FRAME_END__+0x101cc>
  4006d4:	91380000 	add	x0, x0, #0xe00
  4006d8:	f9400001 	ldr	x1, [x0]
  4006dc:	b5000061 	cbnz	x1, 4006e8 <frame_dummy+0x18>
  4006e0:	17ffffe0 	b	400660 <register_tm_clones>
  4006e4:	d503201f 	nop
  4006e8:	58000101 	ldr	x1, 400708 <frame_dummy+0x38>
  4006ec:	b4ffffa1 	cbz	x1, 4006e0 <frame_dummy+0x10>
  4006f0:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  4006f4:	910003fd 	mov	x29, sp
  4006f8:	d63f0020 	blr	x1
  4006fc:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400700:	17ffffd8 	b	400660 <register_tm_clones>
  400704:	d503201f 	nop
	...

0000000000400710 <again_malloc>:
  int front, rear, len;
  int max_size;
};

void again_malloc(struct queue * src)
{
  400710:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400714:	910003fd 	mov	x29, sp
  400718:	f9000fa0 	str	x0, [x29, #24]
  int * des;
  int i;

  des = realloc(src->queue, 2 * src->max_size * sizeof(int));
  40071c:	f9400fa0 	ldr	x0, [x29, #24]
  400720:	f9400002 	ldr	x2, [x0]
  400724:	f9400fa0 	ldr	x0, [x29, #24]
  400728:	b9401400 	ldr	w0, [x0, #20]
  40072c:	93407c00 	sxtw	x0, w0
  400730:	d37df000 	lsl	x0, x0, #3
  400734:	aa0003e1 	mov	x1, x0
  400738:	aa0203e0 	mov	x0, x2
  40073c:	97ffff89 	bl	400560 <realloc@plt>
  400740:	f90013a0 	str	x0, [x29, #32]
  if (des == NULL) {
  400744:	f94013a0 	ldr	x0, [x29, #32]
  400748:	f100001f 	cmp	x0, #0x0
  40074c:	540000c1 	b.ne	400764 <again_malloc+0x54>  // b.any
    printf("realloc fail.\n");
  400750:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400754:	9136e000 	add	x0, x0, #0xdb8
  400758:	97ffff8e 	bl	400590 <puts@plt>
    exit(1);
  40075c:	52800020 	mov	w0, #0x1                   	// #1
  400760:	97ffff74 	bl	400530 <exit@plt>
  }

  src->queue = des;
  400764:	f9400fa0 	ldr	x0, [x29, #24]
  400768:	f94013a1 	ldr	x1, [x29, #32]
  40076c:	f9000001 	str	x1, [x0]

  if (src->rear != src->max_size -1) {
  400770:	f9400fa0 	ldr	x0, [x29, #24]
  400774:	b9400c01 	ldr	w1, [x0, #12]
  400778:	f9400fa0 	ldr	x0, [x29, #24]
  40077c:	b9401400 	ldr	w0, [x0, #20]
  400780:	51000400 	sub	w0, w0, #0x1
  400784:	6b00003f 	cmp	w1, w0
  400788:	54000440 	b.eq	400810 <again_malloc+0x100>  // b.none
    for (i = 0; i <= src->max_size; i++)
  40078c:	b9002fbf 	str	wzr, [x29, #44]
  400790:	14000014 	b	4007e0 <again_malloc+0xd0>
      src->queue[i + src->max_size] = src->queue[i];
  400794:	f9400fa0 	ldr	x0, [x29, #24]
  400798:	f9400001 	ldr	x1, [x0]
  40079c:	f9400fa0 	ldr	x0, [x29, #24]
  4007a0:	b9401402 	ldr	w2, [x0, #20]
  4007a4:	b9402fa0 	ldr	w0, [x29, #44]
  4007a8:	0b000040 	add	w0, w2, w0
  4007ac:	93407c00 	sxtw	x0, w0
  4007b0:	d37ef400 	lsl	x0, x0, #2
  4007b4:	8b000020 	add	x0, x1, x0
  4007b8:	f9400fa1 	ldr	x1, [x29, #24]
  4007bc:	f9400022 	ldr	x2, [x1]
  4007c0:	b9802fa1 	ldrsw	x1, [x29, #44]
  4007c4:	d37ef421 	lsl	x1, x1, #2
  4007c8:	8b010041 	add	x1, x2, x1
  4007cc:	b9400021 	ldr	w1, [x1]
  4007d0:	b9000001 	str	w1, [x0]
    for (i = 0; i <= src->max_size; i++)
  4007d4:	b9402fa0 	ldr	w0, [x29, #44]
  4007d8:	11000400 	add	w0, w0, #0x1
  4007dc:	b9002fa0 	str	w0, [x29, #44]
  4007e0:	f9400fa0 	ldr	x0, [x29, #24]
  4007e4:	b9401401 	ldr	w1, [x0, #20]
  4007e8:	b9402fa0 	ldr	w0, [x29, #44]
  4007ec:	6b00003f 	cmp	w1, w0
  4007f0:	54fffd2a 	b.ge	400794 <again_malloc+0x84>  // b.tcont
    
    src->rear += src->max_size;
  4007f4:	f9400fa0 	ldr	x0, [x29, #24]
  4007f8:	b9400c01 	ldr	w1, [x0, #12]
  4007fc:	f9400fa0 	ldr	x0, [x29, #24]
  400800:	b9401400 	ldr	w0, [x0, #20]
  400804:	0b000021 	add	w1, w1, w0
  400808:	f9400fa0 	ldr	x0, [x29, #24]
  40080c:	b9000c01 	str	w1, [x0, #12]
  }

  src->max_size = 2 * src->max_size;
  400810:	f9400fa0 	ldr	x0, [x29, #24]
  400814:	b9401400 	ldr	w0, [x0, #20]
  400818:	531f7801 	lsl	w1, w0, #1
  40081c:	f9400fa0 	ldr	x0, [x29, #24]
  400820:	b9001401 	str	w1, [x0, #20]
}
  400824:	d503201f 	nop
  400828:	a8c37bfd 	ldp	x29, x30, [sp], #48
  40082c:	d65f03c0 	ret

0000000000400830 <init>:

void init(struct queue * src, int ms)
{
  400830:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400834:	910003fd 	mov	x29, sp
  400838:	f9000fa0 	str	x0, [x29, #24]
  40083c:	b90017a1 	str	w1, [x29, #20]
  if (ms <= 0)
  400840:	b94017a0 	ldr	w0, [x29, #20]
  400844:	7100001f 	cmp	w0, #0x0
  400848:	5400006c 	b.gt	400854 <init+0x24>
    exit(1);
  40084c:	52800020 	mov	w0, #0x1                   	// #1
  400850:	97ffff38 	bl	400530 <exit@plt>

  src->max_size = ms;
  400854:	f9400fa0 	ldr	x0, [x29, #24]
  400858:	b94017a1 	ldr	w1, [x29, #20]
  40085c:	b9001401 	str	w1, [x0, #20]
  src->queue = malloc (ms * sizeof(int));
  400860:	b98017a0 	ldrsw	x0, [x29, #20]
  400864:	d37ef400 	lsl	x0, x0, #2
  400868:	97ffff36 	bl	400540 <malloc@plt>
  40086c:	aa0003e1 	mov	x1, x0
  400870:	f9400fa0 	ldr	x0, [x29, #24]
  400874:	f9000001 	str	x1, [x0]
  if (src->queue == NULL)
  400878:	f9400fa0 	ldr	x0, [x29, #24]
  40087c:	f9400000 	ldr	x0, [x0]
  400880:	f100001f 	cmp	x0, #0x0
  400884:	54000061 	b.ne	400890 <init+0x60>  // b.any
    exit(1);
  400888:	52800020 	mov	w0, #0x1                   	// #1
  40088c:	97ffff29 	bl	400530 <exit@plt>

  src->front = src->rear = 0;
  400890:	f9400fa0 	ldr	x0, [x29, #24]
  400894:	b9000c1f 	str	wzr, [x0, #12]
  400898:	f9400fa0 	ldr	x0, [x29, #24]
  40089c:	b9400c01 	ldr	w1, [x0, #12]
  4008a0:	f9400fa0 	ldr	x0, [x29, #24]
  4008a4:	b9000801 	str	w1, [x0, #8]
}
  4008a8:	d503201f 	nop
  4008ac:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4008b0:	d65f03c0 	ret

00000000004008b4 <in>:

void in(struct queue * src, int value)
{
  4008b4:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4008b8:	910003fd 	mov	x29, sp
  4008bc:	f9000fa0 	str	x0, [x29, #24]
  4008c0:	b90017a1 	str	w1, [x29, #20]
  //if ((src->rear + 1) % src->max_size == src->front)
  //src->rear = (src->rear + 1) % src->max_size;

  if (src->rear == src->max_size) {
  4008c4:	f9400fa0 	ldr	x0, [x29, #24]
  4008c8:	b9400c01 	ldr	w1, [x0, #12]
  4008cc:	f9400fa0 	ldr	x0, [x29, #24]
  4008d0:	b9401400 	ldr	w0, [x0, #20]
  4008d4:	6b00003f 	cmp	w1, w0
  4008d8:	540000a1 	b.ne	4008ec <in+0x38>  // b.any
    printf("queue was bottom.\n");
  4008dc:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  4008e0:	91372000 	add	x0, x0, #0xdc8
  4008e4:	97ffff2b 	bl	400590 <puts@plt>
    return ;
  4008e8:	1400000f 	b	400924 <in+0x70>
  }
  else {
    src->queue[src->rear] = value;
  4008ec:	f9400fa0 	ldr	x0, [x29, #24]
  4008f0:	f9400001 	ldr	x1, [x0]
  4008f4:	f9400fa0 	ldr	x0, [x29, #24]
  4008f8:	b9400c00 	ldr	w0, [x0, #12]
  4008fc:	93407c00 	sxtw	x0, w0
  400900:	d37ef400 	lsl	x0, x0, #2
  400904:	8b000020 	add	x0, x1, x0
  400908:	b94017a1 	ldr	w1, [x29, #20]
  40090c:	b9000001 	str	w1, [x0]
    src->rear++;
  400910:	f9400fa0 	ldr	x0, [x29, #24]
  400914:	b9400c00 	ldr	w0, [x0, #12]
  400918:	11000401 	add	w1, w0, #0x1
  40091c:	f9400fa0 	ldr	x0, [x29, #24]
  400920:	b9000c01 	str	w1, [x0, #12]
  }
}
  400924:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400928:	d65f03c0 	ret

000000000040092c <out>:

int out(struct queue * src)
{
  40092c:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400930:	910003fd 	mov	x29, sp
  400934:	f9000fa0 	str	x0, [x29, #24]
  int temp;

  if (src->front == src->rear) {
  400938:	f9400fa0 	ldr	x0, [x29, #24]
  40093c:	b9400801 	ldr	w1, [x0, #8]
  400940:	f9400fa0 	ldr	x0, [x29, #24]
  400944:	b9400c00 	ldr	w0, [x0, #12]
  400948:	6b00003f 	cmp	w1, w0
  40094c:	540000c1 	b.ne	400964 <out+0x38>  // b.any
    printf("queueu was empty.\n");
  400950:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400954:	91378000 	add	x0, x0, #0xde0
  400958:	97ffff0e 	bl	400590 <puts@plt>
    exit(1);
  40095c:	52800020 	mov	w0, #0x1                   	// #1
  400960:	97fffef4 	bl	400530 <exit@plt>
  }

  // src->front = (src->front + 1) % src->max_size;
  temp = src->queue[src->front];
  400964:	f9400fa0 	ldr	x0, [x29, #24]
  400968:	f9400001 	ldr	x1, [x0]
  40096c:	f9400fa0 	ldr	x0, [x29, #24]
  400970:	b9400800 	ldr	w0, [x0, #8]
  400974:	93407c00 	sxtw	x0, w0
  400978:	d37ef400 	lsl	x0, x0, #2
  40097c:	8b000020 	add	x0, x1, x0
  400980:	b9400000 	ldr	w0, [x0]
  400984:	b9002fa0 	str	w0, [x29, #44]
  src->front++;
  400988:	f9400fa0 	ldr	x0, [x29, #24]
  40098c:	b9400800 	ldr	w0, [x0, #8]
  400990:	11000401 	add	w1, w0, #0x1
  400994:	f9400fa0 	ldr	x0, [x29, #24]
  400998:	b9000801 	str	w1, [x0, #8]
  if (src->front == src->rear)
  40099c:	f9400fa0 	ldr	x0, [x29, #24]
  4009a0:	b9400801 	ldr	w1, [x0, #8]
  4009a4:	f9400fa0 	ldr	x0, [x29, #24]
  4009a8:	b9400c00 	ldr	w0, [x0, #12]
  4009ac:	6b00003f 	cmp	w1, w0
  4009b0:	540000e1 	b.ne	4009cc <out+0xa0>  // b.any
    src->front = src->rear = 0;
  4009b4:	f9400fa0 	ldr	x0, [x29, #24]
  4009b8:	b9000c1f 	str	wzr, [x0, #12]
  4009bc:	f9400fa0 	ldr	x0, [x29, #24]
  4009c0:	b9400c01 	ldr	w1, [x0, #12]
  4009c4:	f9400fa0 	ldr	x0, [x29, #24]
  4009c8:	b9000801 	str	w1, [x0, #8]

  return temp;
  4009cc:	b9402fa0 	ldr	w0, [x29, #44]
  // return src->queue[src->front++];
}
  4009d0:	a8c37bfd 	ldp	x29, x30, [sp], #48
  4009d4:	d65f03c0 	ret

00000000004009d8 <peek>:

int peek(struct queue * src)
{
  4009d8:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4009dc:	910003fd 	mov	x29, sp
  4009e0:	f9000fa0 	str	x0, [x29, #24]
  if (src->front == src->rear) {
  4009e4:	f9400fa0 	ldr	x0, [x29, #24]
  4009e8:	b9400801 	ldr	w1, [x0, #8]
  4009ec:	f9400fa0 	ldr	x0, [x29, #24]
  4009f0:	b9400c00 	ldr	w0, [x0, #12]
  4009f4:	6b00003f 	cmp	w1, w0
  4009f8:	540000c1 	b.ne	400a10 <peek+0x38>  // b.any
    printf("queue was empty.\n");
  4009fc:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400a00:	9137e000 	add	x0, x0, #0xdf8
  400a04:	97fffee3 	bl	400590 <puts@plt>
    exit(1);
  400a08:	52800020 	mov	w0, #0x1                   	// #1
  400a0c:	97fffec9 	bl	400530 <exit@plt>
  }

  return src->queue[(src->front + 1) % src->max_size];
  400a10:	f9400fa0 	ldr	x0, [x29, #24]
  400a14:	f9400002 	ldr	x2, [x0]
  400a18:	f9400fa0 	ldr	x0, [x29, #24]
  400a1c:	b9400800 	ldr	w0, [x0, #8]
  400a20:	11000400 	add	w0, w0, #0x1
  400a24:	f9400fa1 	ldr	x1, [x29, #24]
  400a28:	b9401421 	ldr	w1, [x1, #20]
  400a2c:	1ac10c03 	sdiv	w3, w0, w1
  400a30:	1b017c61 	mul	w1, w3, w1
  400a34:	4b010000 	sub	w0, w0, w1
  400a38:	93407c00 	sxtw	x0, w0
  400a3c:	d37ef400 	lsl	x0, x0, #2
  400a40:	8b000040 	add	x0, x2, x0
  400a44:	b9400000 	ldr	w0, [x0]
}
  400a48:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400a4c:	d65f03c0 	ret

0000000000400a50 <empty>:

int empty(struct queue * src) 
{
  400a50:	d10043ff 	sub	sp, sp, #0x10
  400a54:	f90007e0 	str	x0, [sp, #8]
  if (src->front == src->rear)
  400a58:	f94007e0 	ldr	x0, [sp, #8]
  400a5c:	b9400801 	ldr	w1, [x0, #8]
  400a60:	f94007e0 	ldr	x0, [sp, #8]
  400a64:	b9400c00 	ldr	w0, [x0, #12]
  400a68:	6b00003f 	cmp	w1, w0
  400a6c:	54000061 	b.ne	400a78 <empty+0x28>  // b.any
    return 1;
  400a70:	52800020 	mov	w0, #0x1                   	// #1
  400a74:	14000002 	b	400a7c <empty+0x2c>
  else
    return 0;
  400a78:	52800000 	mov	w0, #0x0                   	// #0
}
  400a7c:	910043ff 	add	sp, sp, #0x10
  400a80:	d65f03c0 	ret

0000000000400a84 <clear>:

void clear(struct queue * src)
{
  400a84:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400a88:	910003fd 	mov	x29, sp
  400a8c:	f9000fa0 	str	x0, [x29, #24]
  if (src->queue != NULL) {
  400a90:	f9400fa0 	ldr	x0, [x29, #24]
  400a94:	f9400000 	ldr	x0, [x0]
  400a98:	f100001f 	cmp	x0, #0x0
  400a9c:	540001c0 	b.eq	400ad4 <clear+0x50>  // b.none
    free(src->queue);
  400aa0:	f9400fa0 	ldr	x0, [x29, #24]
  400aa4:	f9400000 	ldr	x0, [x0]
  400aa8:	97fffebe 	bl	4005a0 <free@plt>
    src->queue = NULL;
  400aac:	f9400fa0 	ldr	x0, [x29, #24]
  400ab0:	f900001f 	str	xzr, [x0]
    src->front = src->rear = 0;
  400ab4:	f9400fa0 	ldr	x0, [x29, #24]
  400ab8:	b9000c1f 	str	wzr, [x0, #12]
  400abc:	f9400fa0 	ldr	x0, [x29, #24]
  400ac0:	b9400c01 	ldr	w1, [x0, #12]
  400ac4:	f9400fa0 	ldr	x0, [x29, #24]
  400ac8:	b9000801 	str	w1, [x0, #8]
    src->max_size = 0;
  400acc:	f9400fa0 	ldr	x0, [x29, #24]
  400ad0:	b900141f 	str	wzr, [x0, #20]
  }
}
  400ad4:	d503201f 	nop
  400ad8:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400adc:	d65f03c0 	ret

0000000000400ae0 <display>:

void display(struct queue * src)
{
  400ae0:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400ae4:	910003fd 	mov	x29, sp
  400ae8:	f9000fa0 	str	x0, [x29, #24]
  int i;

  i = src->front;
  400aec:	f9400fa0 	ldr	x0, [x29, #24]
  400af0:	b9400800 	ldr	w0, [x0, #8]
  400af4:	b9002fa0 	str	w0, [x29, #44]
  printf("queue element is :\n");
  400af8:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400afc:	91384000 	add	x0, x0, #0xe10
  400b00:	97fffea4 	bl	400590 <puts@plt>
  /*  while ((i % (src->max_size)) != src->rear ) {
    printf(" i=%d: %d ", i, src->queue[i]);
    i++;
    }*/

  for (i = src->front; i <= src->rear-1; i++) 
  400b04:	f9400fa0 	ldr	x0, [x29, #24]
  400b08:	b9400800 	ldr	w0, [x0, #8]
  400b0c:	b9002fa0 	str	w0, [x29, #44]
  400b10:	1400000d 	b	400b44 <display+0x64>
    printf("%d ", src->queue[i]);
  400b14:	f9400fa0 	ldr	x0, [x29, #24]
  400b18:	f9400001 	ldr	x1, [x0]
  400b1c:	b9802fa0 	ldrsw	x0, [x29, #44]
  400b20:	d37ef400 	lsl	x0, x0, #2
  400b24:	8b000020 	add	x0, x1, x0
  400b28:	b9400001 	ldr	w1, [x0]
  400b2c:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400b30:	9138a000 	add	x0, x0, #0xe28
  400b34:	97fffe9f 	bl	4005b0 <printf@plt>
  for (i = src->front; i <= src->rear-1; i++) 
  400b38:	b9402fa0 	ldr	w0, [x29, #44]
  400b3c:	11000400 	add	w0, w0, #0x1
  400b40:	b9002fa0 	str	w0, [x29, #44]
  400b44:	f9400fa0 	ldr	x0, [x29, #24]
  400b48:	b9400c00 	ldr	w0, [x0, #12]
  400b4c:	51000401 	sub	w1, w0, #0x1
  400b50:	b9402fa0 	ldr	w0, [x29, #44]
  400b54:	6b00003f 	cmp	w1, w0
  400b58:	54fffdea 	b.ge	400b14 <display+0x34>  // b.tcont

  printf("\n\n");
  400b5c:	90000000 	adrp	x0, 400000 <_init-0x4f8>
  400b60:	9138c000 	add	x0, x0, #0xe30
  400b64:	97fffe8b 	bl	400590 <puts@plt>
}
  400b68:	d503201f 	nop
  400b6c:	a8c37bfd 	ldp	x29, x30, [sp], #48
  400b70:	d65f03c0 	ret

0000000000400b74 <main>:

int main()
{
  400b74:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400b78:	910003fd 	mov	x29, sp
  struct queue queue;
  
  init(& queue, 10);
  400b7c:	910063a0 	add	x0, x29, #0x18
  400b80:	52800141 	mov	w1, #0xa                   	// #10
  400b84:	97ffff2b 	bl	400830 <init>
  in(& queue, 1);
  400b88:	910063a0 	add	x0, x29, #0x18
  400b8c:	52800021 	mov	w1, #0x1                   	// #1
  400b90:	97ffff49 	bl	4008b4 <in>
  in(& queue, 2);
  400b94:	910063a0 	add	x0, x29, #0x18
  400b98:	52800041 	mov	w1, #0x2                   	// #2
  400b9c:	97ffff46 	bl	4008b4 <in>
  in(& queue, 3);
  400ba0:	910063a0 	add	x0, x29, #0x18
  400ba4:	52800061 	mov	w1, #0x3                   	// #3
  400ba8:	97ffff43 	bl	4008b4 <in>
  in(& queue, 4);
  400bac:	910063a0 	add	x0, x29, #0x18
  400bb0:	52800081 	mov	w1, #0x4                   	// #4
  400bb4:	97ffff40 	bl	4008b4 <in>
  in(& queue, 5);
  400bb8:	910063a0 	add	x0, x29, #0x18
  400bbc:	528000a1 	mov	w1, #0x5                   	// #5
  400bc0:	97ffff3d 	bl	4008b4 <in>
  in(& queue, 6);
  400bc4:	910063a0 	add	x0, x29, #0x18
  400bc8:	528000c1 	mov	w1, #0x6                   	// #6
  400bcc:	97ffff3a 	bl	4008b4 <in>
  in(& queue, 7);
  400bd0:	910063a0 	add	x0, x29, #0x18
  400bd4:	528000e1 	mov	w1, #0x7                   	// #7
  400bd8:	97ffff37 	bl	4008b4 <in>
  in(& queue, 8);
  400bdc:	910063a0 	add	x0, x29, #0x18
  400be0:	52800101 	mov	w1, #0x8                   	// #8
  400be4:	97ffff34 	bl	4008b4 <in>
  in(& queue, 9);
  400be8:	910063a0 	add	x0, x29, #0x18
  400bec:	52800121 	mov	w1, #0x9                   	// #9
  400bf0:	97ffff31 	bl	4008b4 <in>
  in(& queue, 10);
  400bf4:	910063a0 	add	x0, x29, #0x18
  400bf8:	52800141 	mov	w1, #0xa                   	// #10
  400bfc:	97ffff2e 	bl	4008b4 <in>
  in(& queue, 11);	// queue was bottom.
  400c00:	910063a0 	add	x0, x29, #0x18
  400c04:	52800161 	mov	w1, #0xb                   	// #11
  400c08:	97ffff2b 	bl	4008b4 <in>
  display(& queue);	// 1 2 3 4 5 6 7 8 9 10
  400c0c:	910063a0 	add	x0, x29, #0x18
  400c10:	97ffffb4 	bl	400ae0 <display>
  
  out(& queue);		// del 1
  400c14:	910063a0 	add	x0, x29, #0x18
  400c18:	97ffff45 	bl	40092c <out>
  out(& queue);		// del 2
  400c1c:	910063a0 	add	x0, x29, #0x18
  400c20:	97ffff43 	bl	40092c <out>
  out(& queue);		// del 3
  400c24:	910063a0 	add	x0, x29, #0x18
  400c28:	97ffff41 	bl	40092c <out>
  display(& queue);	// 4 5 6 7 8 9 10
  400c2c:	910063a0 	add	x0, x29, #0x18
  400c30:	97ffffac 	bl	400ae0 <display>

  in(& queue, 77);	// queue was bottom. 因为不是循环队列，需全部出列后才能再次入列，以下增加所测。
  400c34:	910063a0 	add	x0, x29, #0x18
  400c38:	528009a1 	mov	w1, #0x4d                  	// #77
  400c3c:	97ffff1e 	bl	4008b4 <in>
  //  in(& queue, 8);
  //in(& queue, 9);
  //in(& queue, 10);
  display(& queue);	// 4 5 6 7 8 9 10
  400c40:	910063a0 	add	x0, x29, #0x18
  400c44:	97ffffa7 	bl	400ae0 <display>
  

  /*
   * 2017/7/27 再次调试所加
   */
  out(& queue);		// del 4
  400c48:	910063a0 	add	x0, x29, #0x18
  400c4c:	97ffff38 	bl	40092c <out>
  out(& queue);		// del 5
  400c50:	910063a0 	add	x0, x29, #0x18
  400c54:	97ffff36 	bl	40092c <out>
  out(& queue);		// del 6
  400c58:	910063a0 	add	x0, x29, #0x18
  400c5c:	97ffff34 	bl	40092c <out>
  out(& queue);		// del 7
  400c60:	910063a0 	add	x0, x29, #0x18
  400c64:	97ffff32 	bl	40092c <out>
  out(& queue);		// del 8
  400c68:	910063a0 	add	x0, x29, #0x18
  400c6c:	97ffff30 	bl	40092c <out>
  out(& queue);		// del 9
  400c70:	910063a0 	add	x0, x29, #0x18
  400c74:	97ffff2e 	bl	40092c <out>
  out(& queue);		// del 10
  400c78:	910063a0 	add	x0, x29, #0x18
  400c7c:	97ffff2c 	bl	40092c <out>
  display(& queue);	// 空
  400c80:	910063a0 	add	x0, x29, #0x18
  400c84:	97ffff97 	bl	400ae0 <display>

  in(& queue, 11);
  400c88:	910063a0 	add	x0, x29, #0x18
  400c8c:	52800161 	mov	w1, #0xb                   	// #11
  400c90:	97ffff09 	bl	4008b4 <in>
  in(& queue, 22);
  400c94:	910063a0 	add	x0, x29, #0x18
  400c98:	528002c1 	mov	w1, #0x16                  	// #22
  400c9c:	97ffff06 	bl	4008b4 <in>
  in(& queue, 23);
  400ca0:	910063a0 	add	x0, x29, #0x18
  400ca4:	528002e1 	mov	w1, #0x17                  	// #23
  400ca8:	97ffff03 	bl	4008b4 <in>
  in(& queue, 24);
  400cac:	910063a0 	add	x0, x29, #0x18
  400cb0:	52800301 	mov	w1, #0x18                  	// #24
  400cb4:	97ffff00 	bl	4008b4 <in>
  in(& queue, 25);
  400cb8:	910063a0 	add	x0, x29, #0x18
  400cbc:	52800321 	mov	w1, #0x19                  	// #25
  400cc0:	97fffefd 	bl	4008b4 <in>
  in(& queue, 26);
  400cc4:	910063a0 	add	x0, x29, #0x18
  400cc8:	52800341 	mov	w1, #0x1a                  	// #26
  400ccc:	97fffefa 	bl	4008b4 <in>
  in(& queue, 27);
  400cd0:	910063a0 	add	x0, x29, #0x18
  400cd4:	52800361 	mov	w1, #0x1b                  	// #27
  400cd8:	97fffef7 	bl	4008b4 <in>
  in(& queue, 28);
  400cdc:	910063a0 	add	x0, x29, #0x18
  400ce0:	52800381 	mov	w1, #0x1c                  	// #28
  400ce4:	97fffef4 	bl	4008b4 <in>
  in(& queue, 29);
  400ce8:	910063a0 	add	x0, x29, #0x18
  400cec:	528003a1 	mov	w1, #0x1d                  	// #29
  400cf0:	97fffef1 	bl	4008b4 <in>
  in(& queue, 30);
  400cf4:	910063a0 	add	x0, x29, #0x18
  400cf8:	528003c1 	mov	w1, #0x1e                  	// #30
  400cfc:	97fffeee 	bl	4008b4 <in>
  in(& queue, 31);	// queue was bottom.
  400d00:	910063a0 	add	x0, x29, #0x18
  400d04:	528003e1 	mov	w1, #0x1f                  	// #31
  400d08:	97fffeeb 	bl	4008b4 <in>
  display(& queue); // 11 22 23 24 25 26 27 28 29 30
  400d0c:	910063a0 	add	x0, x29, #0x18
  400d10:	97ffff74 	bl	400ae0 <display>
  400d14:	52800000 	mov	w0, #0x0                   	// #0
}
  400d18:	a8c37bfd 	ldp	x29, x30, [sp], #48
  400d1c:	d65f03c0 	ret

0000000000400d20 <__libc_csu_init>:
  400d20:	a9bc7bfd 	stp	x29, x30, [sp, #-64]!
  400d24:	910003fd 	mov	x29, sp
  400d28:	a9025bf5 	stp	x21, x22, [sp, #32]
  400d2c:	b0000095 	adrp	x21, 411000 <__FRAME_END__+0x101cc>
  400d30:	a90153f3 	stp	x19, x20, [sp, #16]
  400d34:	b0000094 	adrp	x20, 411000 <__FRAME_END__+0x101cc>
  400d38:	9137c2b5 	add	x21, x21, #0xdf0
  400d3c:	9137e294 	add	x20, x20, #0xdf8
  400d40:	cb150294 	sub	x20, x20, x21
  400d44:	a90363f7 	stp	x23, x24, [sp, #48]
  400d48:	aa0203f6 	mov	x22, x2
  400d4c:	2a0003f8 	mov	w24, w0
  400d50:	aa0103f7 	mov	x23, x1
  400d54:	97fffde9 	bl	4004f8 <_init>
  400d58:	9343fe94 	asr	x20, x20, #3
  400d5c:	b4000154 	cbz	x20, 400d84 <__libc_csu_init+0x64>
  400d60:	d2800013 	mov	x19, #0x0                   	// #0
  400d64:	f8737aa3 	ldr	x3, [x21, x19, lsl #3]
  400d68:	aa1603e2 	mov	x2, x22
  400d6c:	aa1703e1 	mov	x1, x23
  400d70:	2a1803e0 	mov	w0, w24
  400d74:	91000673 	add	x19, x19, #0x1
  400d78:	d63f0060 	blr	x3
  400d7c:	eb13029f 	cmp	x20, x19
  400d80:	54ffff21 	b.ne	400d64 <__libc_csu_init+0x44>  // b.any
  400d84:	a94153f3 	ldp	x19, x20, [sp, #16]
  400d88:	a9425bf5 	ldp	x21, x22, [sp, #32]
  400d8c:	a94363f7 	ldp	x23, x24, [sp, #48]
  400d90:	a8c47bfd 	ldp	x29, x30, [sp], #64
  400d94:	d65f03c0 	ret

0000000000400d98 <__libc_csu_fini>:
  400d98:	d65f03c0 	ret

Disassembly of section .fini:

0000000000400d9c <_fini>:
  400d9c:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400da0:	910003fd 	mov	x29, sp
  400da4:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400da8:	d65f03c0 	ret
